/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package fr.uniscol;

import fr.uniscol.model.RapportTraitement;
import fr.uniscol.siecle.model.CorrespondanceSiecleSts;
import javax.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.SessionAttributes;

/**
 *
 * @author Christophe
 */
@Controller
@SessionAttributes(value = {"importedDatasModel", "rapportTraitement"})
public class ImportDonneesCorrespondancesController extends UniscolMainController {
    
    @ModelAttribute("rapportTraitement")
    public RapportTraitement getRapportTraitement(Model model){
        return (RapportTraitement) model.asMap().get("rapportTraitement");
    }
    
    @InitBinder
    public void initBinder(WebDataBinder binder){
    }
    
    @RequestMapping("/correspondances.save")
    public String saveCorrespondances(@RequestParam("correspondance") CorrespondanceSiecleSts[] correspondances, BindingResult results, HttpSession session){
        return "";
    }
}
